package com.fenghongzhang.day005rxprem;

import android.os.Bundle;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

public class Main3Activity extends AppCompatActivity {
    private Button btn;
    private Button btn1;
    private MyMatrix my;
    private Button mark;
    private Button skew;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main3);


        btn = (Button) findViewById(R.id.btn);
        btn1 = (Button) findViewById(R.id.btn1);
        my = (MyMatrix) findViewById(R.id.my);
        initView();

        btn.setOnClickListener(v -> {
            my.scale(2, -1);
//            my.setTranslate(100,100);
        });
        btn1.setOnClickListener(v -> {
//            my.scale(2,2);
            my.setTranslate(100, 100);
        });

        mark.setOnClickListener(v -> {
            my.mark();
        });

        skew.setOnClickListener(v -> {
//            my.setSkew(0,0.5f);
//            myKu.showRefrection();
        });

    }

    private void initView() {
        mark = (Button) findViewById(R.id.mark);
        skew = (Button) findViewById(R.id.skew);
    }
}
